package com.sktk.keepAccount.common.core.exception;

import lombok.Getter;

@Getter
public enum SystemErrorType implements ErrorType {

    SYSTEM_ERROR("0", "系统异常"),
    SYSTEM_BUSY("10000", "系统繁忙,请稍候再试"),

    GATEWAY_NOT_FOUND_SERVICE("404", "服务未找到"),
    GATEWAY_ERROR("500", "网关异常"),
    GATEWAY_CONNECT_TIME_OUT("504", "网关超时"),

    ARGUMENT_NOT_VALID("-1", "请求参数校验不通过"),
    INVALID_TOKEN("10001", "无效token"),
    UPLOAD_FILE_SIZE_LIMIT("20000", "上传文件大小超过限制"),

    DUPLICATE_PRIMARY_KEY("30000","唯一键冲突"),

    QPS_LIMIT("400","超过请求限流"),

    BUSINESS_ERROR("201", "");

    /**
     * 错误类型码
     */
    private String code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    SystemErrorType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
